package com.zyd.shiro.persistence.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.zyd.shiro.persistence.beans.Region;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 数据访问接口
 * @author Administrator
 *
 */
public interface MallRegionDao extends JpaRepository<Region,Integer>,JpaSpecificationExecutor<Region>{

    @Query(value = "SELECT * FROM mall_region bean WHERE bean.pid=?1",nativeQuery = true)
    List<Region> getAllnextRegion(Integer channel);
}
